import {
  IntersectionType,
  OmitType,
  PartialType,
  PickType,
} from '@nestjs/mapped-types';
import { CreateMenuDto } from './create.dto';
import { DeleteMenuDto } from './delete.dto';
import { Exclude } from 'class-transformer';

export class UpdateMenuDto extends IntersectionType(
  PartialType(OmitType(CreateMenuDto, ['parent_id'])),
  PickType(CreateMenuDto, ['parent_id']),
  DeleteMenuDto,
) {
  @Exclude() // 自动过滤多余字段
  extraField?: string;
}
